Repository navigation
fix(android): keep a ripple foreground with the border drawn over the children - #18
Merged
Merged
Conversation
… children The border drawn over the children and a ripple (set by the ui-core plugin) both used the single view foreground, so one erased the other: a view with a border radius, a border width and a ripple lost its border. Removing the border also cleared the ripple. The foreground is now set by View._updateForeground(), from the border (_borderForeground) and the ripple (_rippleForeground): both go in a LayerDrawable, the border over the ripple. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
farfromrefug
marked this pull request as ready for review
November 16, 2026 16:13
weblate
pushed a commit
to weblate/alpimaps
that referenced
this pull request
Nov 18, 2026
typings: the typed lookAhead of the SDK. ui-core: the ripple/border foreground fix (nativescript-community/ui-native-components#28, with Akylas/NativeScript#18). Drop the ui-core portal once it is released. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the current behavior?
Since #17 a view with a border radius and a border width draws its border as the view foreground, over the children. The ui-core plugin draws
rippleColoras the same single foreground (view.setForeground(rippleDrawable)), so whichever runs last wins: a view with a border, a radius and a ripple loses its border (e.g. alpimaps bottom-sheet round action buttons, lens pills). Removing the border also calledsetForeground(null), which cleared the ripple.What is the new behavior?
View._updateForeground()sets the foreground fromnativeView._borderForegroundandnativeView._rippleForeground. With both, they go in aLayerDrawablewith the border over the ripple. The border code goes through it instead of callingsetForeground. The ripple owner (ui-core) sets_rippleForegroundand calls it: nativescript-community/ui-native-components, same-named fix branch. Without that plugin change nothing changes.Manual test (native Android drawing, no unit test): a
GridLayoutwithborderRadius,borderWidthandrippleColor: the border stays and the ripple shows under it on press. Not run yet.🤖 Generated with Claude Code